﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Win32;

namespace ToolManager
{
    public class Manager
    {
        public static void SetMaxPlugin()
        {
            RegistryKey Key = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\");
            string[] names = Key.GetSubKeyNames();
            string[] max = Array.FindAll(names, n => n.Contains("Autodesk 3ds Max"));
            if(max!=null && max.Length>0)
            {
                RegistryKey Key0 = Key.OpenSubKey(max[0]);
                string path = Key0.GetValue("InstallLocation", "").ToString();
#if DEBUG
                Console.WriteLine(path);
#endif
            }
        }
    }
}
